<?php

namespace Kateba\OrderBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Kateba\OrderBundle\Entity\OrderDetail
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Kateba\OrderBundle\Entity\OrderDetailRepository")
 */
class OrderDetail {

    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var Kateba\RestaurantBundle\Entity\Food $food
     * 
     * @ORM\ManyToOne(targetEntity="Kateba\RestaurantBundle\Entity\Food", inversedBy="ordersDetails")
     * @ORM\JoinColumn(name="foodId", referencedColumnName="id", onDelete="CASCADE", onUpdate="CASCADE", nullable=false)
     */
    private $food;

    /**
     * @var Kateba\RestaurantBundle\Entity\ExtraPrice $extraPrice
     * 
     * @ORM\ManyToOne(targetEntity="Kateba\RestaurantBundle\Entity\ExtraPrice", inversedBy="ordersDetails")
     * @ORM\JoinColumn(name="extraPriceId", referencedColumnName="id", onDelete="CASCADE", onUpdate="CASCADE", nullable=false)
     */
    private $extraPrice;

    /**
     * @var Kateba\RestaurantBundle\Entity\Extra $extra
     * 
     * @ORM\ManyToOne(targetEntity="Kateba\OrderBundle\Entity\UserOrder", inversedBy="orderDetails")
     * @ORM\JoinColumn(name="userOrderId", referencedColumnName="id", onDelete="CASCADE", onUpdate="CASCADE", nullable=false)
     */
    private $userOrder;

    /**
     * @var decimal $foodPrice
     *
     * @ORM\Column(name="foodPrice", type="decimal", precision=10, scale=2)
     */
    private $foodPrice;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId() {
        return $this->id;
    }

    /**
     * Set foodPrice
     *
     * @param decimal $foodPrice
     */
    public function setFoodPrice($foodPrice) {
        $this->foodPrice = $foodPrice;
    }

    /**
     * Get foodPrice
     *
     * @return decimal 
     */
    public function getFoodPrice() {
        return $this->foodPrice;
    }

    /**
     * Set food
     *
     * @param Kateba\RestaurantBundle\Entity\Food $food
     */
    public function setFood(\Kateba\RestaurantBundle\Entity\Food $food) {
        $this->food = $food;
    }

    /**
     * Get food
     *
     * @return Kateba\RestaurantBundle\Entity\Food 
     */
    public function getFood() {
        return $this->food;
    }

    /**
     * Set extraPrice
     *
     * @param Kateba\RestaurantBundle\Entity\ExtraPrice $extraPrice
     */
    public function setExtraPrice(\Kateba\RestaurantBundle\Entity\ExtraPrice $extraPrice) {
        $this->extraPrice = $extraPrice;
    }

    /**
     * Get extraPrice
     *
     * @return Kateba\RestaurantBundle\Entity\ExtraPrice 
     */
    public function getExtraPrice() {
        return $this->extraPrice;
    }

    /**
     * Set userOrder
     *
     * @param Kateba\OrderBundle\Entity\UserOrder $userOrder
     */
    public function setUserOrder(\Kateba\OrderBundle\Entity\UserOrder $userOrder) {
        $this->userOrder = $userOrder;
    }

    /**
     * Get userOrder
     *
     * @return Kateba\OrderBundle\Entity\UserOrder 
     */
    public function getUserOrder() {
        return $this->userOrder;
    }

}